<template>
    <div class="home">
        <el-row class="tac">
            <el-col :span="24">
                <el-menu
                    default-active="2"
                    class="el-menu-vertical-demo"
                    @open="handleOpen"
                    @close="handleClose"
                >
                    <el-sub-menu index="1">
                        <template #title>
                            <el-icon><location /></el-icon>
                            <span>功能1</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="1-1">功能1-1</el-menu-item>
                            <el-menu-item index="1-2">功能1-2</el-menu-item>
                        </el-menu-item-group>
                    </el-sub-menu>
                    <el-menu-item index="2">
                        <el-icon><icon-menu /></el-icon>
                        <span>功能2</span>
                    </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>
    </div>
</template>

<script lang="ts" setup>
import { evalCalculate } from '../../utils'
import { Location, Menu as IconMenu } from '@element-plus/icons-vue'

const handleOpen = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
}

console.log(evalCalculate('n+1', 1))
</script>

<style lang="scss" scoped>
@import '../../assets/css/reset-element.scss';
.home {
    width: 100%;
    height: 100%;
}
</style>
